-
-
Notifications
You must be signed in to change notification settings - Fork 790
Fix:#780 Miguel/editor fix #783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…click outside selection the selection is cleared and caret is moved. Context menu is then opened based on new caret location.
…t when right-clicked outside selection and show context menu at new caret location.
|
Thank you for letting me work on this project. :) |
|
Hi @migsan1104 apologies for the delay. Although I think this is likely a valid solution, all the code within the My first guess is that this section of code is the best place to handle it: NotepadNext/src/NotepadNext/dialogs/MainWindow.cpp Lines 1973 to 2010 in 6ab46c4
That is where the main window shows the context menu and may need to do some checking to see if its in a selection or not and possibly clear the selection. Notepad++ also has this behavior and also uses Scintilla so it might have a recommended way of handling this case, but I havent taken the time to dig into the Notepad++ source code in quite a while. |
This PR addresses issue #780 by implementing behavior consistent with modern editors:
If the user right-clicks inside an existing selection, the selection is preserved.
If the user right-clicks outside the selection, the caret moves to the clicked position and the context menu is invoked at the new location. The selection is also cleared.
Added build/ to .gitignore to avoid tracking generated files.